package o;

import android.os.Build.VERSION;
import android.view.accessibility.AccessibilityManager;
import android.view.accessibility.AccessibilityManager.TouchExplorationStateChangeListener;
import androidx.annotation.NonNull;
import androidx.annotation.RequiresApi;

public final class ik {

    public interface a {
        void ˋ(boolean z);
    }

    @RequiresApi(19)
    static class c implements TouchExplorationStateChangeListener {
        final a ˏ;

        c(@NonNull a aVar) {
            this.ˏ = aVar;
        }

        public int hashCode() {
            return this.ˏ.hashCode();
        }

        public boolean equals(Object obj) {
            if (this == obj) {
                return true;
            }
            if (obj == null || getClass() != obj.getClass()) {
                return false;
            }
            return this.ˏ.equals(((c) obj).ˏ);
        }

        public void onTouchExplorationStateChanged(boolean z) {
            this.ˏ.ˋ(z);
        }
    }

    public static boolean ॱ(AccessibilityManager accessibilityManager, a aVar) {
        if (VERSION.SDK_INT < 19 || aVar == null) {
            return false;
        }
        return accessibilityManager.addTouchExplorationStateChangeListener(new c(aVar));
    }

    public static boolean ˎ(AccessibilityManager accessibilityManager, a aVar) {
        if (VERSION.SDK_INT < 19 || aVar == null) {
            return false;
        }
        return accessibilityManager.removeTouchExplorationStateChangeListener(new c(aVar));
    }
}
